<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>

	<head>
		<title>业务处理-采购入库-查看采购入库详情</title>
		<meta charset="utf-8">
		<link rel="stylesheet" type="text/css" href="<%=basePath %>libs/bootstrap-3.3.7-dist/css/bootstrap.min.css">
		<link rel="stylesheet" type="text/css" href="<%=basePath %>css/reset.css">
		<link rel="stylesheet" type="text/css" href="<%=basePath %>css/style.css">
		<link rel="stylesheet" type="text/css" href="<%=basePath %>css/iframe.css">

	</head>

	<body>
		<div id="mainContent">
			<div id="mainContent_content">
				<div class="page_header">
					<a href="<%=basePath%>warehouseOrder/selectByWhere.do">采购入库</a>
					<i class="icon-double-right"></i>
					<a>查看采购入库</a>
				</div>

				<div class="btn rightBtn">
					<input type="button" value="返回" onclick="location.href='<%=basePath%>warehouseOrder/selectByWhere.do'" class="btn btn1"></input>

				</div>
				<form id="generalStorageForm" class="form">
					<div id="requisitionForm" class="box">
						<p>
							<label> 入库单号</label>
							<input type="text" readonly class="form-control" value="${wo1.warehousenumber}"></input>

							<label> 入库人</label>
							<input type="text" readonly class="form-control" value="${buyerPerson.loginName }"></input>

							<label> 类型</label>
							<select name="materialMaterial2" class="form-control select" id="materialMaterial2" onchange="gradeChange()" disabled="disabled">
								<option value="2" <c:if test="${wo1.materialMaterial=='2'}">selected</c:if>>IMPA物料</option>
								<option value="1" <c:if test="${wo1.materialMaterial=='1'}">selected</c:if>>普通物料</option>
							</select>

							<label> 状态</label>
							<select name="status" class="form-control select" disabled="disabled">
								<option value="0" <c:if test="${wo1.status=='0'}">selected</c:if>>未提交</option>
								<option value="1" <c:if test="${wo1.status=='1'}">selected</c:if>>已提交</option>
							</select>

						</p>
						<p>
							<label> 仓库</label>
							<select name="warehouseid" class="form-control select" disabled="disabled">
								<c:forEach items="${warehouseList }" var="warehouse">
									<option value="${warehouse.warehousemanagementid }" <c:if test="${wo1.warehouseid==warehouse.warehousemanagementid}">selected</c:if>>${warehouse.warehousename }</option>
								</c:forEach>
							</select>

							<label>说明</label>
							<input type="text" class="form-control" name="storageinstructions" value="${wo1.company}" readonly></input>

							<label> 备注</label>
							<input type="text" class="form-control doubleWidth" name="remarks" value="${wo1.remarks}" readonly></input>

						</p>
					</div>
					<div class="tableBox box">
						<table class="table table-bordered table_text_center">
							<thead>
								<tr>
									<th>代码</th>
									<th>物品名称</th>
									<th>物品条码</th>
									<th>品牌</th>
									<th>单位</th>
									<th>库存</th>
									<th>有效时间</th>
									<th>采购数量</th>
								</tr>
							</thead>
							<tbody id="purchaseRequestItemTbody">
								<c:forEach items="${list2 }" var="item" varStatus="i">
									<tr>
										<td>${item.IntemInformation.itemcode }</td>
										<td>${item.IntemInformation.chinesename }</td>
										<td>${item.IntemInformation.articlebarcode }</td>
										<td>${item.IntemInformation.brand }</td>

										<td>${item.IntemInformation.purchasingunit }</td>
										<td>${item.IntemInformation.currentstock }</td>
										<td>
											<fmt:formatDate value='${item.WarehouseOrder_iteminformation.expiryDate }' type='date' />
										</td>
										<td>${item.WarehouseOrder_iteminformation.number }</td>
									</tr>
								</c:forEach>
							</tbody>
						</table>

					</div>
					<div class="box updateBox ">
						<p>
							<label>创建人</label>
							<input type="text" class="form-control doubleWidth" readonly value="${createPerson.loginName } "></input>
							<label>创建时间</label>
							<input type="text" class="form-control doubleWidth" readonly value="<fmt:formatDate value='${wo1.createtime  }' pattern=" yyyy-MM-dd HH:mm:ss " /> "></input>
							<br>
							<label>最后处理人</label>
							<input type="text" class="form-control doubleWidth" readonly value="${lastperson.loginName } "></input>
							<label>最后处理时间</label>
							<input type="text" class="form-control doubleWidth" readonly value="<fmt:formatDate value='${wo1.finalprocessingtime  }' pattern=" yyyy-MM-dd HH:mm:ss " /> "></input>
						</p>
					</div>
				</form>
			</div>
		</div>
		<script src="<%=basePath%>js/jquery-3.2.1.min.js"></script>
		<script src="<%=basePath%>libs/bootstrap-3.3.7-dist/js/bootstrap.js"></script>
		<script src="<%=basePath%>libs/bootstrap-table-master/dist/bootstrap-table.js"></script>
		<script src="<%=basePath%>libs/bootstrap-table-master/dist/locale/bootstrap-table-zh-CN.min.js"></script>
		<script src="<%=basePath%>My97DatePickers/WdatePicker.js"></script>
		<script src="<%=basePath%>js/public.js"></script>

	</body>

</html>